<!--
 * @Author: gy
 * @Date: 2020-07-02 10:26:18
 * @LastEditors: gy
 * @LastEditTime: 2020-07-02 20:51:49
-->

<!--station_name	是	string	工位代码
station_code	是	string	工位名称
station_desc	否	string	工位描述
status	是	string	状态(0 正常 1 禁用)
remark	否	string	备注
-->
<!--  -->
<template>
    <div>
        <el-form ref="form" :model="form" :rules="rules">
            <el-form-item label="工位名称" prop="station_name">
                <el-input v-model="form.station_name"></el-input>
            </el-form-item>
            <el-form-item label="工位代码" prop="station_code">
                <el-input v-model="form.station_code"></el-input>
            </el-form-item>
            <el-form-item label="工位描述" prop="station_desc">
                <el-input v-model="form.station_desc"></el-input>
            </el-form-item>
            <el-form-item label="状态">
                <el-switch
                    v-model="form.status"
                    active-value="0"
                    inactive-value="1"
                    active-text="正常"
                    inactive-text="禁用"
                ></el-switch>
            </el-form-item>
            <el-form-item label="备注">
                <el-input type="textarea" v-model="form.remark"></el-input>
            </el-form-item>
        </el-form>
    </div>
</template>

<script>
export default {
    props: {},
    data() {
        return {
            form: {
                station_name:'',
                station_code:'',
                station_desc:'',
                status:'',
                remark:'',
            },
            rules: {
                station_name: [
                    {
                        required: true,
                        message: "请输入工位名称",
                        trigger: "blur"
                    }
                ],
                station_code: [
                    {
                        required: true,
                        message: "请输入工位代码",
                        trigger: "blur"
                    }
                ],
            },
            checkRepeatParam: {
                url:
                    "/material/api/MesStation/CheckMesStationCodeUnique",
                param: "station_code",
                method: "get"
            }
        };
    },

    components: {},

    methods: {}
};
</script>
<style lang="scss" scoped></style>
